<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2019/1/11
 * Time: 20:43
 */
swoole_timer_tick(200,function ($timerid){
    $content="timerid {$timerid} ".date('Y-m-d H:i:s').PHP_EOL;
    swoole_async_writefile(__DIR__.'/1.log',$content,function ($filename){
        echo "write log success: file {$filename}".PHP_EOL;
    },FILE_APPEND);
});


echo 'write 1.log file '.PHP_EOL;